<div ng-if="pagedata.op=='get'" class="fui-page fui-page-current">
    <div class='fui-content' >
		<div class="fui-cell-group" style="margin-top:0">
			<div class="fui-tab fui-tab-success">
				<a ng-repeat="item in pagedata.cash_set" ng-class="{'active':pagedata.post.fee_type==item.type}" ng-click="pagedata.post.creditfee=item.fee;pagedata.post.rate=item.rate;pagedata.post.fee_type=item.type;pagedata.post.fee=0;pagedata.refresh()">{{item.title}}提现</a>
			</div>
		</div>
        <div class='fui-cell-group fui-cell-group-o'>
            <div class='fui-cell-title'>
                <div ng-if="pagedata.post.fee_type!=2" class='fui-cell-info' style='color:#999'>当前可提现额度: ￥
					<span id='current'>{{pagedata.post.creditfee || 0.00}}</span>
					<a id='btn-all' class='text-primary external' href='#' ng-click="pagedata.post.fee=pagedata.post.creditfee;pagedata.refresh()">全部提现</a>
				</div>
            </div>
			<div class='fui-cell-title'>提现金额
                <small ng-if="pagedata.setting.min>0">提现额度最小为: <span class='text-danger'>￥{{pagedata.setting.min}}</span></small>
            </div>
            <div ng-if="pagedata.post.fee_type!=2" class='fui-cell'>
                <div class='fui-cell-label big' style='width:auto;'>￥</div>
                <div class='fui-cell-info'><input type='text' class='fui-input' placeholder="0.00" style='font-size:1.2rem;background-color:#f2f2f2;border-radius:0.2rem;padding:0 0.3rem' ng-model="pagedata.post.fee" ng-change="pagedata.refresh()"></div>
            </div>
			 <div ng-if="pagedata.post.fee_type==2" class='fui-cell'>
				<div class='fui-cell-label big' style='width:auto;'>积分</div>
                <div class='fui-cell-info'>
				<div><input type='text' class='fui-input' placeholder="0.00" style='font-size:1.2rem;background-color:#f2f2f2;border-radius:0.2rem;padding:0 0.3rem' ng-model="pagedata.post.fee" ng-change="pagedata.refresh()"></div>
				<div class="red">到账:￥{{pagedata.post.money || '0.00'}} <span class="gray">({{pagedata.post.rate}}比1提现)</span></div>
				</div>
			</div>
			<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;'>支付密码</div>
					<div class='fui-cell-info'><input type='password' class='fui-input' style='background-color:#f2f2f2;height:auto;border-radius:0.2rem;padding:0.3rem' placeholder="支付密码" ng-model="pagedata.post.password"></div>
					<div class='fui-cell-remark' style="margin-left:0.5rem"><span href="javascript:;" ng-click="pagedata.showpassword=true">{{pagedata.item.paypassword?'重置密码':'设密码'}}</span></div>
			</div>
            <div class="fui-cell">
                <div class="fui-cell-label" style="width: 120px;"><span class="re-g">提现方式</span></div>
                <div ng-if="pagedata.post.fee_type!=1" class="fui-cell-info">
                    <select id="applytype" ng-model="pagedata.post.type">
                        <option ng-repeat="(key,value) in pagedata.setting.type_array" value="{{key}}" ng-selected="pagedata.post.type==key">{{value}}</option>
                    </select>
                </div>
				<div ng-if="pagedata.post.fee_type==1" class="fui-cell-info">
                    <select id="applytype" ng-model="pagedata.post.to_type">
						<option value="1" ng-selected="pagedata.post.to_type=='1'">提现到余额</option>
						<option value="2" ng-selected="pagedata.post.to_type=='2'">提现到微信钱包</option>
                    </select>
                </div>
                <div class="fui-cell-remark"></div>
            </div>
            <div ng-if="pagedata.post.type==1 || pagedata.post.type==2" class="fui-cell ab-group">
                <div class="fui-cell-label" style="width: 120px;">姓名</div>
                <div class="fui-cell-info"><input type="text" id="realname" name="realname" ng-model="pagedata.post.realname" class='fui-input' value="{{pagedata.post.realname}}" max="25"/></div>
            </div>
            <div ng-if="pagedata.post.type==1" class="fui-cell alipay-group">
                <div class="fui-cell-label" style="width: 120px;">支付宝帐号</div>
                <div class="fui-cell-info">
				<input type="text" id="alipay" name="alipay" class='fui-input' ng-model="pagedata.post.alipay" value="{{pagedata.post.alipay}}" max="25"/>
				</div>
            </div>
            <div ng-if="pagedata.post.type==1" class="fui-cell alipay-group">
                    <div class="fui-cell-label" style="width: 120px;">确认帐号</div>
                    <div class="fui-cell-info"><input type="text" id="alipay1" ng-model="pagedata.post.alipay1" name="alipay1" class='fui-input' value="{{pagedata.post.alipay1}}" max="25"/></div>
            </div>
            <div ng-if="pagedata.post.type==2" class="fui-cell bank-group" >
                    <div class="fui-cell-label" style="width: 120px;">所属银行</div>
                    <div class="fui-cell-info">
                       	<input type="text" name="bankname" class='fui-input' ng-model="pagedata.post.bankname" value="{{pagedata.post.bankname}}"/>
                    </div>
            </div>
            <div ng-if="pagedata.post.type==2" class="fui-cell bank-group">
					<div class="fui-cell-label" style="width: 120px;">银行卡号</div>
					<div class="fui-cell-info"><input type="text" id="bankcard" name="bankcard" class='fui-input' ng-model="pagedata.post.bankcard" value="{{pagedata.post.bankcard}}" max="25"/></div>
            </div>
            <div ng-if="pagedata.post.type==2" class="fui-cell bank-group">
                    <div class="fui-cell-label" style="width: 120px;">确认卡号</div>
                    <div class="fui-cell-info"><input type="text" id="bankcard1" name="bankcard1" class='fui-input' ng-model="pagedata.post.bankcard1" value="{{pagedata.post.bankcard1}}" max="25"/></div>
            </div>
            <div ng-if="pagedata.post.to_type!='1'" class='fui-cell-title disabled'>提现手续费为 <text class='text-danger'> {{pagedata.setting.percent || 0}}</text>%</div>
            <div ng-if="pagedata.post.to_type!='1'" class='fui-cell-title charge-group disabled' style="padding-top:0">本次提现将扣除手续费 ￥<text class='text-danger'> {{pagedata.item.service_money || '0.00'}}</text>
            </div>
            <div ng-if="pagedata.post.to_type!='1'" class='fui-cell-title charge-group disabled' style="padding-top:0">本次提现实际到账金额 ￥<text class='text-danger'> {{pagedata.item.cash_money || '0.00'}}</text>({{pagedata.post.rate}}比1)</div>
        </div>
        <a id='btn-next' class='btn btn-success block' ng-click="post(pagedata.post,'post')">提现</a>
		<div class="jy-content">
		<div ng-if="pagedata.setting.desc" class="tips tips-yellow" style="margin:0">
			<i class="fa fa-bullhorn"></i> [<red>提现说明</red>]：
			<div ng-bind-html="trust(pagedata.setting.desc)"></div>
		</div>
		</div>
    </div>
</div>
<div ng-if="pagedata.showpassword" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.showpassword=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 1rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在进行“设置支付密码”操作
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'><i class="icon icon-password"  style="font-size:0.8rem"></i></div>
					<div class='fui-cell-info'><input type='password' class='fui-input' placeholder="支付密码" ng-model="pagedata.post.password"></div>
				</div>
				<div ng-if="pagedata.post.iscode==1 && pagedata.item.mobile" class="fui-cell">
					<div class="fui-cell-label" style="width:auto;color:#fff">手机号</div>
					<div class="fui-cell-info"><input type="text" class='fui-input' ng-model="pagedata.item.mobile" /></div>
					<div class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="tool.mobile_code({'mobile':pagedata.item.mobile,'oldmobile':pagedata.member.oldmobile},'sms_code')" id="sms_code">获取验证码</a></div>
				</div>
				<div ng-if="pagedata.post.iscode==1 && pagedata.item.mobile" class="fui-cell">
					<div class="fui-cell-label" style="width:auto;color:#fff">验证码</div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.post.smscode" /></div>
				</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fff;color:#fc6d60" ng-click="post(pagedata.post,'core/member.feecard/password/')">确认提交</a>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('common/pluginnav')"></div>
<script>
scope.pagedata.refresh=function(){
	scope.pagedata.post.money=(scope.pagedata.post.fee/scope.pagedata.post.rate).toFixed(2);
	scope.pagedata.item.service_money=(scope.pagedata.post.money*scope.pagedata.setting.percent/100).toFixed(2);
	scope.pagedata.item.cash_money=(scope.pagedata.post.money-scope.pagedata.item.service_money).toFixed(2);
}
</script>